package pojo;

import java.sql.Timestamp;
import java.util.Collection;
import java.util.Objects;

public class TbPhoneRecord {
    private Integer recordId;
    private String phoneName;
    private Integer userId;
    private Timestamp recordTime;
    private String orderNum;
    private String selectDetail;
    private Double phonePrice;
    private Integer phoneId;
    private TbUser tbUserByUserId;
    private Collection<TbRecordDetail> tbRecordDetailsByRecordId;

    public Integer getRecordId() {
        return recordId;
    }

    public void setRecordId(Integer recordId) {
        this.recordId = recordId;
    }

    public String getPhoneName() {
        return phoneName;
    }

    public void setPhoneName(String phoneName) {
        this.phoneName = phoneName;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Timestamp getRecordTime() {
        return recordTime;
    }

    public void setRecordTime(Timestamp recordTime) {
        this.recordTime = recordTime;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getSelectDetail() {
        return selectDetail;
    }

    public void setSelectDetail(String selectDetail) {
        this.selectDetail = selectDetail;
    }

    public Double getPhonePrice() {
        return phonePrice;
    }

    public void setPhonePrice(Double phonePrice) {
        this.phonePrice = phonePrice;
    }

    public Integer getPhoneId() {
        return phoneId;
    }

    public void setPhoneId(Integer phoneId) {
        this.phoneId = phoneId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbPhoneRecord that = (TbPhoneRecord) o;
        return Objects.equals(recordId, that.recordId) &&
                Objects.equals(phoneName, that.phoneName) &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(recordTime, that.recordTime) &&
                Objects.equals(orderNum, that.orderNum) &&
                Objects.equals(selectDetail, that.selectDetail) &&
                Objects.equals(phonePrice, that.phonePrice) &&
                Objects.equals(phoneId, that.phoneId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(recordId, phoneName, userId, recordTime, orderNum, selectDetail, phonePrice, phoneId);
    }

    public TbUser getTbUserByUserId() {
        return tbUserByUserId;
    }

    public void setTbUserByUserId(TbUser tbUserByUserId) {
        this.tbUserByUserId = tbUserByUserId;
    }

    public Collection<TbRecordDetail> getTbRecordDetailsByRecordId() {
        return tbRecordDetailsByRecordId;
    }

    public void setTbRecordDetailsByRecordId(Collection<TbRecordDetail> tbRecordDetailsByRecordId) {
        this.tbRecordDetailsByRecordId = tbRecordDetailsByRecordId;
    }
}
